package com.maxie.factory.simple;


import com.maxie.factory.simple.entity.Pizza;

public class PizzaStore {

    private SimpleFactory simpleFactory;
    public Pizza orderPizza(String type) {
        // 将pizza对象的创建放到工厂方法中去
        Pizza pizza = simpleFactory.createPizza(type);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
        return pizza;
    }
}
